package model;

import javax.persistence.*;

@Entity
@Table(name="comments")
public class Comment extends BaseEntity {	
	private static final long serialVersionUID = 1L;
	private User user;
	private String text;

	public Comment() {

	}
	public Comment(User user, String text) {
		super();
		this.user = user;
		this.text = text;
	}
	
	@OneToOne 
	@JoinColumn (name="id_user")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name="text")
	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

}
